Skip to content

chore(gitignore): anchor binary names to repo root#2522

Merged
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums/anchor-gitignore-binaries
May 21, 2026
Merged

chore(gitignore): anchor binary names to repo root#2522
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums/anchor-gitignore-binaries

Conversation

@SamMorrowDrums
Copy link
Copy Markdown
Collaborator

The bare github-mcp-server, mcpcurl, and e2e.test entries in .gitignore matched those names anywhere in the tree, which silently ignored any new file added under cmd/github-mcp-server/ (the rule matched the directory component). I hit this while adding a new .go file to that directory in #2521 — it was invisible to git status until git add -f.

The intent of those rules was to ignore the binaries produced by go build at repo root, so this anchors each one with a leading slash. The existing cmd/github-mcp-server/github-mcp-server rule on line 2 still covers the binary when built inside the cmd directory.

Verification

$ git check-ignore -v cmd/github-mcp-server/insiders_docs.go
(not ignored)

$ git check-ignore -v github-mcp-server
.gitignore:20:/github-mcp-server  github-mcp-server

$ git check-ignore -v cmd/github-mcp-server/github-mcp-server
.gitignore:2:cmd/github-mcp-server/github-mcp-server  cmd/github-mcp-server/github-mcp-server

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The bare `github-mcp-server`, `mcpcurl`, and `e2e.test` rules matched
those names anywhere in the tree, which silently ignored new files
created under `cmd/github-mcp-server/` (the rule treats the directory
component as a match). The intent was to ignore the binaries produced
by `go build` at repo root, so anchor each rule with a leading slash.

The existing `cmd/github-mcp-server/github-mcp-server` rule on line 2
continues to ignore the binary when built inside the cmd directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner May 21, 2026 20:59
Copilot AI review requested due to automatic review settings May 21, 2026 20:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@SamMorrowDrums SamMorrowDrums merged commit 6fd9d07 into main May 21, 2026
18 checks passed
@SamMorrowDrums SamMorrowDrums deleted the sammorrowdrums/anchor-gitignore-binaries branch May 21, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants